package com.springboot.cloud.demos.feign.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.form.MomentCommentForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "ribbon-consumer", fallback = MomentCommentServiceFallback.class)
public interface MomentCommentService {

    @RequestMapping(value = "/momentComment", method = RequestMethod.POST)
    Result save(@RequestBody MomentCommentForm momentCommentForm);

    @RequestMapping(value = "/momentComment/query", method = RequestMethod.GET)
    Result query(@RequestParam(value = "momentId")String momentId, @RequestParam(value = "pageNo",defaultValue = "1" ) Integer pageNo, @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize);

    @RequestMapping(value = "/momentComment/queryCount", method = RequestMethod.GET)
    Result queryCount(String momentId);
}
